require('./index.scss');
var template = require('./template.html');

var comp = avalon.component('ms-nav', {
    template: template,
    defaults: {
        navlist: '',
        visible:"",
        onReady(){
            $("#nav").on('click','.title',function(){
                var $this = $(this),
                    $subnav = $this.siblings('.subnav');
                if( $subnav ){
                    $subnav.slideToggle();
                    $this.toggleClass('arrow_up');
                }
            });
        }
    }
});
module.exports = comp;